Optimal. Leaf size=112 \[ \frac {a^3 \cos ^4(c+d x)}{4 d}-\frac {a \left (a^2-3 b^2\right ) \cos ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cos (c+d x)}{d}+\frac {a^2 b \cos ^3(c+d x)}{d}-\frac {3 a b^2 \log (\cos (c+d x))}{d}+\frac {b^3 \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4397, 2837, 12, 894} \[ -\frac {a \left (a^2-3 b^2\right ) \cos ^2(c+d x)}{2 d}-\frac {b \left (3 a^2-b^2\right ) \cos (c+d x)}{d}+\frac {a^2 b \cos ^3(c+d x)}{d}+\frac {a^3 \cos ^4(c+d x)}{4 d}-\frac {3 a b^2 \log (\cos (c+d x))}{d}+\frac {b^3 \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 894
Rule 2837
Rule 4397
Rubi steps
\begin {align*} \int \cos (c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx &=\int (b+a \cos (c+d x))^3 \sin (c+d x) \tan ^2(c+d x) \, dx\\ &=-\frac {\operatorname {Subst}\left (\int \frac {a^2 (b+x)^3 \left (a^2-x^2\right )}{x^2} \, dx,x,a \cos (c+d x)\right )}{a^3 d}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {(b+x)^3 \left (a^2-x^2\right )}{x^2} \, dx,x,a \cos (c+d x)\right )}{a d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (3 a^2 b \left (1-\frac {b^2}{3 a^2}\right )+\frac {a^2 b^3}{x^2}+\frac {3 a^2 b^2}{x}+\left (a^2-3 b^2\right ) x-3 b x^2-x^3\right ) \, dx,x,a \cos (c+d x)\right )}{a d}\\ &=-\frac {b \left (3 a^2-b^2\right ) \cos (c+d x)}{d}-\frac {a \left (a^2-3 b^2\right ) \cos ^2(c+d x)}{2 d}+\frac {a^2 b \cos ^3(c+d x)}{d}+\frac {a^3 \cos ^4(c+d x)}{4 d}-\frac {3 a b^2 \log (\cos (c+d x))}{d}+\frac {b^3 \sec (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 98, normalized size = 0.88 \[ \frac {-4 \left (a^3-6 a b^2\right ) \cos (2 (c+d x))+a^3 \cos (4 (c+d x))+8 b \left (4 b^2-9 a^2\right ) \cos (c+d x)+8 a^2 b \cos (3 (c+d x))-96 a b^2 \log (\cos (c+d x))+32 b^3 \sec (c+d x)}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.61, size = 128, normalized size = 1.14 \[ \frac {8 \, a^{3} \cos \left (d x + c\right )^{5} + 32 \, a^{2} b \cos \left (d x + c\right )^{4} - 96 \, a b^{2} \cos \left (d x + c\right ) \log \left (-\cos \left (d x + c\right )\right ) - 16 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 32 \, b^{3} - 32 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} + {\left (5 \, a^{3} - 24 \, a b^{2}\right )} \cos \left (d x + c\right )}{32 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 147, normalized size = 1.31 \[ \frac {a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d}-\frac {\cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right ) a^{2} b}{d}-\frac {2 a^{2} b \cos \left (d x +c \right )}{d}-\frac {3 a \,b^{2} \left (\sin ^{2}\left (d x +c \right )\right )}{2 d}-\frac {3 a \,b^{2} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{d \cos \left (d x +c \right )}+\frac {b^{3} \cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{d}+\frac {2 b^{3} \cos \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 87, normalized size = 0.78 \[ \frac {a^{3} \sin \left (d x + c\right )^{4} + 4 \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a^{2} b - 6 \, {\left (\sin \left (d x + c\right )^{2} + \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} a b^{2} + 4 \, b^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.18, size = 225, normalized size = 2.01 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (4\,a^3+4\,a^2\,b-6\,a\,b^2+12\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a^2\,b+6\,a\,b^2-12\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (-4\,a^3+12\,a^2\,b+6\,a\,b^2+4\,b^3\right )-4\,a^2\,b+4\,b^3+6\,a\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {6\,a\,b^2\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right )^{3} \cos {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________